package java8.lambda.demo03;

import java8.lambda.demo01.Apple;

import java.util.function.BiFunction;
import java.util.function.Function;

/**
 * @author ChangLiang
 * @date 2020/4/22
 */
public class AppleFunction {

    public static Apple applyAppleFunction(Apple apple, Function<Apple, Apple> function) {
        return function.apply(apple);
    }

    public static Apple applyAppleFunctionWithColorAndWeight(String color, Long weight, BiFunction<String, Long, Apple> function) {
        return function.apply(color, weight);
    }
}
